﻿<phone:PhoneApplicationPage 
    x:Class="SevenDrops.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True"
    x:Name="Main">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="60" />
            <RowDefinition Height="*"/>
            <RowDefinition Height="80"></RowDefinition>
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="1" Text="Current Account:" Style="{StaticResource PhoneTextTitle3Style}" Margin="20,15,0,0" HorizontalAlignment="Left" Width="171"></TextBlock>
        <TextBlock Grid.Row="1" Text="NAME" Margin="201,15,102,0" Style="{StaticResource PhoneTextTitle3Style}"></TextBlock>
        <Button Grid.Row="1" Height="80" Width="80" Margin="380,-10,0,0" Click="Button_Click_1">
            <Image Height="48" Width="48" Source="/Images/pick.png" Margin="-8,0,0,0"></Image>
        </Button>
        
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <Image Source="/Images/drops.png" Height="164" Width="164" Margin="339,0,0,0"></Image>
            <TextBlock x:Name="ApplicationTitle" Margin="0,-150,0,0" Text="SevenDrops" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <Grid x:Name="ContentPanel" Grid.Row="2" Margin="12,29,12,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="309*" />
                <ColumnDefinition Width="147*" />
            </Grid.ColumnDefinitions>
            <ListBox x:Name="ImageList" ItemsSource="{Binding ElementName=Main,Path=ImageCollection}" Grid.ColumnSpan="2">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Width="460" Height="80">
                            <Image Height="128" Width="128" Source="{Binding Path=Source}" Margin="-310,0,0,0"></Image>
                            <TextBlock Name="FileNameHolder" Text="{Binding Path=ImageName}" Margin="70,0,0,0" Width="220" TextWrapping="Wrap"></TextBlock>
                            <Button Click="Button_Click_2" Width="80" Height="80" Margin="380,0,0,0">
                                <Image Source="/Images/delete.png" Height="48" Width="48" Margin="-8,0,0,0"></Image>
                            </Button>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
        
        <Button Grid.Row="3" Content="Add Image" Click="Button_Click" Margin="0,0,236,0"></Button>
        <Button Content="Upload" Height="80" HorizontalAlignment="Left" Margin="235,0,0,0" Name="button1" VerticalAlignment="Top" Width="246" Grid.Row="3" Click="button1_Click" />
    </Grid>
</phone:PhoneApplicationPage>